
for i=unique(eyelink.filenum)'
    m_pro_srt(i,1)=mean(eyelink.srt(eyelink.filenum==i & eyelink.error==0 & eyelink.anti==0));
    m_pro_srt(i,2)=mean(eyelink.srt(eyelink.filenum==i & eyelink.error==0 & eyelink.anti==0 & eyelink.delay==0.0));
    m_pro_srt(i,3)=mean(eyelink.srt(eyelink.filenum==i & eyelink.error==0 & eyelink.anti==0 & eyelink.delay==0.5));
    m_pro_srt(i,4)=mean(eyelink.srt(eyelink.filenum==i & eyelink.error==0 & eyelink.anti==0 & eyelink.delay==1.0));
    
    m_anti_srt(i,1)=mean(eyelink.srt(eyelink.filenum==i & eyelink.error==0 & eyelink.anti==1));
    m_anti_srt(i,2)=mean(eyelink.srt(eyelink.filenum==i & eyelink.error==0 & eyelink.anti==1 & eyelink.delay==0.0));
    m_anti_srt(i,3)=mean(eyelink.srt(eyelink.filenum==i & eyelink.error==0 & eyelink.anti==1 & eyelink.delay==0.5));
    m_anti_srt(i,4)=mean(eyelink.srt(eyelink.filenum==i & eyelink.error==0 & eyelink.anti==1 & eyelink.delay==1.0));
    
    
end

anti_pro=m_anti_srt-m_pro_srt

for i=unique(eyelink.subjectnum)'
    temp=unique(eyelink.filenum);
    periblockbasedsubjectmean(i,1)= mean(anti_pro(unique(eyelink.filenum(eyelink.subjectnum==i & eyelink.peri==1)),1))
    periblockbasedsubjectmean(i,2)= mean(anti_pro(unique(eyelink.filenum(eyelink.subjectnum==i & eyelink.peri==1)),2))
    periblockbasedsubjectmean(i,3)= mean(anti_pro(unique(eyelink.filenum(eyelink.subjectnum==i & eyelink.peri==1)),3))
    periblockbasedsubjectmean(i,4)= mean(anti_pro(unique(eyelink.filenum(eyelink.subjectnum==i & eyelink.peri==1)),4))
    
    centblockbasedsubjectmean(i,1)= mean(anti_pro(unique(eyelink.filenum(eyelink.subjectnum==i & eyelink.peri==0)),1))
    centblockbasedsubjectmean(i,2)= mean(anti_pro(unique(eyelink.filenum(eyelink.subjectnum==i & eyelink.peri==0)),2))
    centblockbasedsubjectmean(i,3)= mean(anti_pro(unique(eyelink.filenum(eyelink.subjectnum==i & eyelink.peri==0)),3))
    centblockbasedsubjectmean(i,4)= mean(anti_pro(unique(eyelink.filenum(eyelink.subjectnum==i & eyelink.peri==0)),4))
end

ttest(blockbasedsubjectmean(:,1))
ttest(blockbasedsubjectmean(:,2))
ttest(blockbasedsubjectmean(:,3))
ttest(blockbasedsubjectmean(:,4))
ttest(periblockbasedsubjectmean(:,1))
ttest(periblockbasedsubjectmean(:,2))
ttest(periblockbasedsubjectmean(:,3))
ttest(periblockbasedsubjectmean(:,4))
ttest(centblockbasedsubjectmean(:,1))
ttest(centblockbasedsubjectmean(:,2))
ttest(centblockbasedsubjectmean(:,3))
ttest(centblockbasedsubjectmean(:,4))

fig(11);clf;
subplot(2,1,1);title('centrally cued')
boxplot(centblockbasedsubjectmean,0)
hline(0)
subplot(2,1,2);title('peripherally cued')
boxplot(periblockbasedsubjectmean,0)
hline(0)
